# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=clutter
pkgver=1.26.4
pkgrel=3
pkgdesc="Library for creating fast, visually-appealing interfaces"
url="https://wiki.gnome.org/Projects/Clutter"
arch="all"
license="LGPL-2.0-or-later"
depends_dev="json-glib-dev at-spi2-core-dev mesa-dev libxcomposite-dev libxi-dev cairo-dev"
makedepends="$depends_dev cogl-dev gtk+3.0-dev pango-dev gobject-introspection-dev intltool"
checkdepends="xvfb-run"
options="!check" # Can't find its own backends
subpackages="$pkgname-dev $pkgname-doc $pkgname-lang"
source="https://download.gnome.org/sources/clutter/${pkgver%.*}/clutter-$pkgver.tar.xz"

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--with-x \
		--enable-gdk-backend \
		--enable-egl-backend \
		--enable-wayland-backend \
		--enable-x11-backend \
		--enable-evdev-input
	make
}

check() {
	env XDG_RUNTIME_DIR=/tmp xvfb-run make check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="6d43ac09df7671fa2bda74d1231166e8331f3ef1dbe0d167225033b3ddae7377d1062db81b73fc498c2e9f0db467bf4febb7306a6f40c9ef0266dac2a397f43a  clutter-1.26.4.tar.xz"
